package cn.exrick.xboot.modules.subsystemNews.entity;

import cn.exrick.xboot.base.XbootBaseEntity;
import cn.exrick.xboot.common.constant.CommonConstant;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author Exrick
 */
@Data
@Entity
//@Table(name = "t_subsystem_news")
@Table(name = "t_notice_total")
@TableName("t_notice_total")
@ApiModel(value = "子系统新闻")
public class SubsystemNews extends XbootBaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "标题")
    private String title;
    @ApiModelProperty(value = "地址")
    private String url;
    @ApiModelProperty(value = "新闻部门")
    private String department;
    @ApiModelProperty(value = "数据级别")
    private Integer rate;
    @ApiModelProperty(value = "代码：用来区别子系统新闻与公告的")
    private String code;
    @ApiModelProperty(value = "数据来源（记录数据是从什么系统推送过来的）")
    private String source;
    //这个字段不是数据库中的字段，是为了接收数据方便而创建的字段
    @TableField(exist = false)
    //@ApiModelProperty(value = "负责存储查询数据的总数")
    private transient Integer num;
    @ApiModelProperty(value = "图片地址）")
    private  String imageUrl;
    @ApiModelProperty(value = "区分本地数据和异构数据1:本地 0：异构系统")
    private  String infoCode;

    /**
     * 新增合表字段
     */
    @ApiModelProperty(value = "公告内容")
     private String  conten;

    @ApiModelProperty(value = "数据标识ID")
    private String infoId;

    @TableField(exist = false)
    @ApiModelProperty(value = "接口")
    private transient String urlInterface;
    /*public SubsystemNews(){
        this.source="native";//将数据默认成本地数据
    }*/
}